package com.jye.cloud.user.mapper;

import com.jye.cloud.domain.Comments;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;

@Mapper
public interface CommentsMapper{

    Integer findCommentCountByPIdAndType(@Param("pId") int pId, @Param("type") int type);

    List<Comments> findCommentsByTypeAndPId(@Param("type")int type, @Param("pId")int pId,@Param("skip") int skip, @Param("limit")int limit);


    List<Comments> findCommentsByTypeAndPIdNoLimit(@Param("type")int type, @Param("pId")int pId);

    void addComment(@Param("comments") Comments comments);


    void updateCommentByIdAndStatus(@Param("id")int id, @Param("status")int status);

    void deleteCommentById(@Param("id")int id);
}
